import XQIcon from '../../assets/icon/vote/ywh/xiaoqu.png';
import {Link} from "react-keeper";

import {Card, WhiteSpace, WingBlank} from "antd-mobile";

export function YwhCard(ywh) {
  let link = '/home/vote/ywh/';
  if (ywh.cy) {
    link = link + 'org/' + ywh.id;
  } else {
    link = link + 'c/' + ywh.id;
  }

  return (
    <Link to={link} state={{courtId: ywh.id, courtName: ywh.name, ...ywh}}>
      <WingBlank size="lg">
        <WhiteSpace size="lg" />
        <Card>
          <Card.Header
            title={ywh.name}
            thumb={XQIcon}
            thumbStyle={{width: '64px', height: '64px'}}
          />
          <Card.Body>
            <div className="card_body_content">{ywh.address}</div>
          </Card.Body>
          {/*已经产生业委会的，点击进入查看业委会组成*/}
          <Card.Footer content="" extra={<div>正在进行业委会单元长投票</div>} />
        </Card>
      </WingBlank>
    </Link>
  );
}
